package controller.servlet.paymentForms;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import model.Card;
import controller.dao.Dao_Card;

public class deletePaymentForms extends HttpServlet {
	private static final long serialVersionUID = 1L;
	
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		int codigo = Integer.parseInt(request.getParameter("cod"));
		Dao_Card daoc = new Dao_Card();
		Card c = daoc.list(codigo);
		c.setActive(0);
		daoc.delete(c);
		response.sendRedirect("/ShoppingCart.Com_V6/admin/payment-forms.ja");
	}
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
	
	}

}
